<template>
  <div class="service-item-container">
    <div class="title-section">
      <div class="title">{{ data.title }}</div>
      <div class="vip">年费服务模式</div>
    </div>
    <div class="detail-container">
      <span>{{ data.detail }}</span>
    </div>
    <div class="company">
      <a>{{ data.company }}</a>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      required: true,
    },
  },
};
</script>

<style lang="scss" scoped>
.service-item-container {
  height: 184px;
  background: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  .title-section {
    $height: 38px;
    height: $height;
    background: linear-gradient(90deg, #5486ec 0%, #759ae3 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    .title {
      line-height: $height;
      font-size: 15px;
      overflow: hidden; //超出的文本隐藏
      text-overflow: ellipsis; //溢出用省略号显示
      white-space: nowrap; //溢出不换行
      color: white;
      flex: 0 1 auto;
    }
    .vip {
      --v-height: 23px;
      height: --v-height;
      line-height: --v-height;
      background: white;
      flex: 0 0 8em;
      text-align: center;
      border-radius: calc(var(--v-height) / 2);
      color: #285fce;
      font-size: 13px;
    }
  }

  .detail-container {
    padding: 15px;
    font-size: 14px;
    height: 112px;
  }

  .company {
    color:#285fce;
    margin-left: 15px;
    font-size: 14px;
    cursor: pointer;
  }
}
</style>
